package org.example.ioc;

import org.example.ioc.controller.UserController;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * ClassName: IOCTest3
 * Package: org.example.ioc
 * Description:
 *
 * @Author wanghao
 * @Create 2024-07-07 17:43
 * @Version 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = "classpath:applicationContext.xml")
@ContextConfiguration(classes = {MyConfiguration.class})
public class IOCTest3 {

    @Autowired
    private UserController userController;

    @Test
    public void test1(){
        userController.index();
    }
}
